import 'package:flutter/cupertino.dart';
import 'package:xuance/constant.dart';

class CustomProgressBar extends StatelessWidget {
  final double height;
  final Color backgroundColor;
  final Color progressColor;
  final double progress;

  const CustomProgressBar(
      {super.key,
      required this.height,
      required this.backgroundColor,
      required this.progressColor,
      required this.progress});

  @override
  Widget build(BuildContext context) {
    return Container(
        height: height,
        decoration: BoxDecoration(color: backgroundColor, borderRadius: br5),
        child: Stack(children: [
          FractionallySizedBox(
              widthFactor: progress,
              alignment: Alignment.centerLeft,
              child: Container(
                  decoration:
                      BoxDecoration(color: progressColor, borderRadius: br5)))
        ]));
  }
}
